package com.lanting.meetingserver.domain;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.lanting.meetingserver.base.BaseEntity;
import com.lanting.meetingserver.util.ConvertEnum2Str;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamOmitField;

@XStreamAlias("error")
public class ErrorMsg extends BaseEntity{
	

	@XStreamAsAttribute
	@Expose
	private int code;
	
	@XStreamAsAttribute
	@Expose
	private String msg;
	
	@XStreamAlias("level")
	@XStreamAsAttribute
	@Expose
	@SerializedName("level")
	private String levelString;
	
	@XStreamOmitField
	private int level;

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
		this.levelString = ConvertEnum2Str.getErrorLevel(level);
	}
	
	public String getLevelString(){
		return levelString;
	}
	
	

}
